SPB Git forge

spb/websensor

Public
33commits 1branches 0releases
3.4 MBsize
maindefault branch
10 days agolast push
TypeScript 55.4% Python 43.2% SQL 1.2%
638 B · 13 lines tsx
Raw Blame History
1import { permanentRedirect } from "next/navigation";23export const dynamic = "force-dynamic";45/** `/timeline/:id` lives on the entity page now — permanently redirected to `/entity/:id?tab=timeline`. */6export default async function TimelinePage({ params, searchParams }: { params: Promise<{ id: string }>; searchParams: Promise<{ cursor?: string; range?: string }> }) {7  const { id } = await params;8  const sp = await searchParams;9  const q = new URLSearchParams({ tab: "timeline", range: sp.range ?? "all" });10  if (sp.cursor) q.set("cursor", sp.cursor);11  permanentRedirect(`/entity/${encodeURIComponent(id)}?${q.toString()}`);12}13